import { MainService } from './../../service/main.service';
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';

@Component({
  selector: 'app-main-nav',
  templateUrl: './main-nav.component.html',
  styleUrls: ['./main-nav.component.css']
})
export class MainNavComponent implements OnInit {

navList




  active:boolean=true;
  constructor(private router:Router,private service:MainService) {
    service.getFromServ('/api/category/getTop',{},res=>{
      console.log(res);
      this.navList = res.data
    },err=>{})

 }

  ngOnInit() {
  }

}
